class HELLO_WORLD_4

insert
	IUP_INTERFACE

create {ANY}
   make

feature {ANY}

   make
      local
			s: STRING
			gui: IUP
			dlg: IUP_DIALOG
			l: IUP_LABEL
			btn: IUP_BUTTON
			vb: IUP_VBOX
      do
			gui := iup_open

			create l.label("Hello world from IUP.")

			create btn.button("OK")
			btn.set_cb_action(agent click_btn(?))
			create vb.vbox({ARRAY[IUP_WIDGET] 1, << l, btn >>})

			create dlg.dialog(vb)
			dlg.set_title("Hello World 4")
			s := dlg.show_predefined_xy("IUP_CENTER", "IUP_CENTER")

         gui.main_loop
			gui.close
      end

	click_btn (button: IUP_BUTTON): STRING
		local
			ms: IUP_MESSAGE
		do
			create ms.message("Hello World Message", "Hello world from IUP.")

			Result := "IUP_CLOSE"
		end
      
end
